F1:: {
    MouseGetPos &MouseX, &MouseY
    Color := PixelGetColor(978,848)
    A_Clipboard := "(" MouseX "," MouseY ") == `"" Color "`"" 
}
XButton2::
    {
        ;twox()
        global i:=0
        ;while(True)
        while(GetKeyState("XButton2", "P"))
        {
           ; threex()
            twox()
        }
        
    }

    XButton1::{
        SendInput "{s}"
        Sleep 50
        SendInput "{s}"
    }

    tp()
    {
        ToolTip "=========`n=========`n=========", 920, 752
    }

    twox()
    {
        i:=0
        while(GetKeyState("XButton2", "P")) { 
            c1 := PixelGetColor(930,844)
            if (c1 != "0xB9724D")
            {
                SendInput "{t}"
                SendInput "{f}"
            } else 
            {
                color1 := PixelGetColor(1022, 679) ;5毒->不过遮罩
                color2 := PixelGetColor(1022, 678) ;5毒->过遮罩
                color3 := PixelGetColor(1056, 678) ;第二框框
                color4 := PixelGetColor(1056, 679) ;
                ; NO
                color5 := PixelGetColor(1016, 660) ; 0x355B22;5毒边界，证明这个 5是毒状态
                color6 := PixelGetColor(1050, 660) ; 0x355B22

                if((color1 == "0x987998" || color2 == "0x837683") && color5=="0x355B22") {
                    SendInput "{t}"
                }
                else
                {
                    SendInput "{r}"
                }

                if ((color3 == "0x837683" || color4 == "0x987998") && color6=="0x355B22") 
                {
                    SendInput "{t}"
                } else
                {
                    SendInput "{r}"
                }
            }
        }
    }

    threex()
    {
            SendInput "{r}"
            Sleep 50
            SendInput "{t}"
            Sleep 50
            SendInput "{x}"
            Sleep 50
            c1 := PixelGetColor(978,848)
            if (c1 == "0x2A2428") {
                SendInput "{3}"
                Sleep 50 
            }

    }